<?php
//获取表前缀
$prefix = longbing_get_prefix();

//每个一个sql语句结束，都必须以英文分号结束。因为在执行sql时，需要分割单个脚本执行。
//表前缀需要自己添加{$prefix} 以下脚本被测试脚本


$sql = <<<updateSql



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_about_us` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT '',
  `text` text,
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `top` int(11) DEFAULT '0',
  `type` int(11) DEFAULT '0' COMMENT '0 普通 1认养 2土地',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_address` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_name` varchar(64) DEFAULT '',
  `mobile` varchar(32) DEFAULT '',
  `province` varchar(64) DEFAULT '',
  `city` varchar(64) DEFAULT '',
  `area` varchar(64) DEFAULT '',
  `status` tinyint(3) DEFAULT '0',
  `lng` varchar(64) DEFAULT '0',
  `lat` varchar(64) DEFAULT '0',
  `address` varchar(255) DEFAULT '',
  `top` int(11) DEFAULT '0',
  `create_time` int(11) DEFAULT '0',
  `address_info` varchar(625) DEFAULT '',
  `user_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;







CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_article` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `user_id` int(11) DEFAULT '0',
  `title` varchar(255) DEFAULT '',
  `text` longtext,
  `create_time` bigint(11) DEFAULT '0',
  `top` int(11) DEFAULT '0',
  `status` int(11) DEFAULT '1',
  `cover` varchar(255) DEFAULT '',
  `type` int(11) DEFAULT '1',
  `sub_title` varchar(255) DEFAULT '',
  `iv` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;





CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_attachment` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(10) unsigned NOT NULL,
  `uid` int(10) unsigned NOT NULL,
  `filename` varchar(255) NOT NULL,
  `attachment` varchar(255) NOT NULL,
  `type` tinyint(3) unsigned NOT NULL,
  `createtime` int(10) unsigned NOT NULL,
  `module_upload_dir` varchar(100) DEFAULT NULL,
  `group_id` int(11) DEFAULT NULL,
  `longbing_attachment_path` char(255) NOT NULL DEFAULT '' COMMENT 'path',
  `longbing_driver` char(10) NOT NULL DEFAULT '' COMMENT 'loacl',
  `longbing_from` varchar(255) NOT NULL DEFAULT '' COMMENT 'web',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_attachment_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(25) NOT NULL DEFAULT '',
  `uniacid` int(11) DEFAULT NULL,
  `uid` int(11) DEFAULT '0',
  `type` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_bag_atv` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(64) DEFAULT '' COMMENT '标题',
  `cover` varchar(125) DEFAULT '' COMMENT '封面图',
  `start_time` bigint(11) DEFAULT '0' COMMENT '开始时间',
  `end_time` bigint(11) DEFAULT '0' COMMENT '结束时间',
  `is_phone` tinyint(3) DEFAULT '0' COMMENT '是否必须授权手机号',
  `user_num` int(11) DEFAULT '0' COMMENT '可推荐人数',
  `share_cover` varchar(255) DEFAULT '' COMMENT '分享图',
  `text` text CHARACTER SET utf8mb4 COMMENT '活动说明',
  `have_num` int(11) DEFAULT '0',
  `lock` int(11) DEFAULT '0',
  `user_coupon` int(11) DEFAULT '0' COMMENT '新人券',
  `user_coupon_num` int(11) DEFAULT '0' COMMENT '新人券数量',
  `share_coupon` int(11) DEFAULT '0' COMMENT '分享人的券',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_bag_atv_coupon` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `atv_id` int(11) DEFAULT NULL,
  `coupon_id` int(11) DEFAULT NULL,
  `num` int(11) DEFAULT NULL,
  `type` tinyint(3) DEFAULT '1' COMMENT '1新客 2推荐人',
  `have_num` int(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_bag_atv_record` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `atv_id` int(11) DEFAULT '0',
  `share_user` int(11) DEFAULT '0' COMMENT '分享人',
  `get_user` int(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT NULL,
  `user_coupon` int(11) DEFAULT '0',
  `user_coupon_num` int(11) DEFAULT '0',
  `share_coupon` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_bag_atv_record_coupon` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `type` tinyint(3) DEFAULT '1' COMMENT '1分享者 2获取者',
  `coupon_id` int(11) DEFAULT '0',
  `atv_id` int(11) DEFAULT '0',
  `record_id` int(11) DEFAULT '0',
  `num` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_balance_card` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT '' COMMENT '标题',
  `price` double(10,2) DEFAULT '0.00' COMMENT '售卖价格',
  `true_price` double(10,2) DEFAULT '0.00' COMMENT '实际价格',
  `top` int(11) DEFAULT '0',
  `status` int(11) DEFAULT '1',
  `create_time` int(11) DEFAULT '0',
  `member_level` int(11) DEFAULT '0' COMMENT '绑定的会员等级id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_balance_order_list` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `order_code` varchar(255) DEFAULT '',
  `transaction_id` varchar(255) DEFAULT '',
  `pay_price` double(10,2) DEFAULT '0.00',
  `sale_price` double(10,2) DEFAULT '0.00',
  `true_price` double(10,2) DEFAULT '0.00',
  `create_time` bigint(12) DEFAULT '0',
  `pay_time` bigint(12) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `title` varchar(255) DEFAULT '',
  `card_id` int(11) DEFAULT '0',
  `now_balance` double(10,2) DEFAULT '0.00' COMMENT '当前余额',
  `member_level` int(11) DEFAULT '0' COMMENT '绑定的会员等级id',
  `phone` varchar(32) DEFAULT '0' COMMENT '电话号码',
  `have_syn` tinyint(3) DEFAULT '0' COMMENT '是否同步到了银豹',
  `error_msg` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_balance_refund_order` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `order_code` varchar(255) DEFAULT '',
  `transaction_id` varchar(255) DEFAULT '',
  `card_id` int(11) DEFAULT '0',
  `order_id` int(11) DEFAULT '0',
  `apply_price` double(10,2) DEFAULT '0.00',
  `refund_price` double(10,2) DEFAULT '0.00',
  `title` varchar(255) DEFAULT '',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `sh_time` bigint(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_balance_water` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `order_id` int(11) DEFAULT '0',
  `type` int(11) DEFAULT '1' COMMENT '1充值,2消费',
  `add` tinyint(3) DEFAULT '0',
  `price` decimal(10,2) DEFAULT '0.00' COMMENT '多少钱',
  `create_time` bigint(12) DEFAULT '0',
  `before_balance` double(10,2) DEFAULT '0.00',
  `after_balance` double(10,2) DEFAULT '0.00',
  `scene` tinyint(3) DEFAULT '1' COMMENT '0赛车 1商城 2餐饮',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_banner` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `img` varchar(128) DEFAULT '',
  `top` int(11) DEFAULT '1',
  `link` varchar(255) DEFAULT '',
  `status` tinyint(3) DEFAULT '1',
  `type` int(255) DEFAULT '1' COMMENT '1轮播图 2广告图 3认养轮播图',
  `connect_type` int(11) DEFAULT '1' COMMENT '1店铺 2文章',
  `text_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_banner_text` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `banner_id` int(11) DEFAULT '0',
  `text_id` int(11) DEFAULT '0',
  `type` int(11) DEFAULT '0' COMMENT '1轮播图 2广告图',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_breed` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT '',
  `cover` varchar(255) DEFAULT '',
  `price` decimal(10,2) DEFAULT '0.00',
  `top` int(11) DEFAULT '0',
  `farmer_id` int(11) DEFAULT '0',
  `status` int(11) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `sub_title` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_breed_order` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `order_code` varchar(255) DEFAULT '',
  `user_id` int(11) DEFAULT '0',
  `claim_order_id` int(11) DEFAULT '0' COMMENT '认养订单id',
  `farmer_id` int(11) DEFAULT '0',
  `pay_price` decimal(10,2) DEFAULT '0.00',
  `transaction_id` varchar(64) DEFAULT '',
  `create_time` bigint(11) DEFAULT NULL,
  `pay_time` bigint(11) DEFAULT '0',
  `balance` decimal(10,2) DEFAULT '0.00',
  `over_time` bigint(11) DEFAULT '0' COMMENT '订单超时退款时间',
  `pay_type` tinyint(3) DEFAULT '1',
  `text` varchar(625) DEFAULT '',
  `int_price` decimal(10,2) DEFAULT '0.00' COMMENT '原价',
  `discount_price` decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额',
  `coupon_id` int(11) DEFAULT '0' COMMENT '优惠券id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_breed_order_goods` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `order_id` int(11) DEFAULT NULL,
  `goods_id` int(11) DEFAULT NULL,
  `goods_name` varchar(255) DEFAULT '',
  `goods_cover` varchar(255) DEFAULT '',
  `goods_num` int(11) DEFAULT '1',
  `goods_price` decimal(10,2) DEFAULT '0.00',
  `true_num` int(11) DEFAULT '0',
  `true_price` decimal(10,2) DEFAULT '0.00',
  `singe_true_price` decimal(10,2) DEFAULT '0.00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_car` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `farmer_id` int(11) DEFAULT '0',
  `goods_id` int(11) DEFAULT '0',
  `spe_id` int(11) DEFAULT '0',
  `goods_num` int(11) DEFAULT '1',
  `type` int(11) DEFAULT '1' COMMENT '1养殖 5商城',
  `status` int(11) DEFAULT '1',
  `is_show` int(11) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_claim` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `title` varchar(255) DEFAULT '',
  `cate_id` int(11) DEFAULT '0',
  `cover` varchar(255) DEFAULT '' COMMENT '封面图',
  `desc` varchar(625) DEFAULT '' COMMENT '简介',
  `price` decimal(10,2) DEFAULT '0.00' COMMENT '价格',
  `breed` varchar(255) DEFAULT '' COMMENT '品种',
  `cycle` int(11) DEFAULT '0' COMMENT '周期',
  `output` decimal(10,2) DEFAULT '0.00' COMMENT '产量',
  `harvest_text` varchar(255) DEFAULT '' COMMENT '收货',
  `harvest_cover` varchar(255) DEFAULT '',
  `address` varchar(255) DEFAULT '' COMMENT '地址',
  `lng` varchar(32) DEFAULT '',
  `lat` varchar(32) DEFAULT '',
  `text` text CHARACTER SET utf8mb4 COMMENT '认养图文详情',
  `source_id` int(11) DEFAULT '0' COMMENT '溯源id',
  `monitor_id` int(11) DEFAULT '0' COMMENT '监控id',
  `status` int(11) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `user_id` int(11) DEFAULT '0',
  `farmer_id` int(11) DEFAULT '0',
  `send_cycle` varchar(64) DEFAULT '' COMMENT '配送周期',
  `send_times` int(11) DEFAULT '0' COMMENT '配送次数',
  `sale_num` int(11) DEFAULT '0' COMMENT '销量',
  `start_time` bigint(11) DEFAULT '0' COMMENT '认养周期开始时间',
  `end_time` bigint(11) DEFAULT '0' COMMENT '认养周期结束时间',
  `stock` int(11) DEFAULT '0' COMMENT '库存',
  `lock` int(11) DEFAULT '0' COMMENT '乐观锁',
  `imgs` text,
  `unit` varchar(255) DEFAULT '' COMMENT '单位',
  `machine_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;









CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_claim_order` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `order_code` varchar(64) DEFAULT '' COMMENT '订单号',
  `user_id` int(11) DEFAULT '0',
  `pay_price` decimal(10,2) DEFAULT '0.00',
  `balance` decimal(10,2) DEFAULT '0.00' COMMENT '余额支付',
  `goods_name` varchar(255) DEFAULT '',
  `goods_cover` varchar(255) DEFAULT '',
  `goods_price` decimal(10,2) DEFAULT '0.00',
  `goods_id` int(11) DEFAULT '0',
  `breed` varchar(255) DEFAULT '' COMMENT '品种',
  `cycle` int(11) DEFAULT '0' COMMENT '认养周期',
  `harvest_text` varchar(255) DEFAULT '',
  `harvest_cover` varchar(255) DEFAULT '',
  `name` varchar(255) DEFAULT '' COMMENT '用户给认养取的名字',
  `send_type` tinyint(3) DEFAULT '1' COMMENT '1自提 2快递',
  `text` varchar(625) DEFAULT '' COMMENT '备注',
  `transaction_id` varchar(64) DEFAULT '',
  `create_time` bigint(11) DEFAULT '0',
  `pay_time` bigint(11) DEFAULT '0',
  `cancel_time` bigint(11) DEFAULT '0',
  `claim_id` int(11) DEFAULT '0' COMMENT '认养id',
  `farmer_id` int(11) DEFAULT '0' COMMENT '农场主id',
  `pay_type` int(11) DEFAULT '1',
  `source_id` int(11) DEFAULT '0' COMMENT '溯源id',
  `send_cycle` varchar(64) DEFAULT '' COMMENT '配送周期',
  `send_times` int(11) DEFAULT '0' COMMENT '配送次数',
  `over_time` bigint(11) DEFAULT '0' COMMENT '订单超时退款时间',
  `num` int(11) DEFAULT '1',
  `unit` varchar(255) DEFAULT '',
  `start_time` bigint(11) DEFAULT NULL COMMENT '认养开始时间',
  `end_time` bigint(11) DEFAULT '0' COMMENT '认养结束时间',
  `discount_price` decimal(10,2) DEFAULT '0.00' COMMENT '抵扣金额',
  `coupon_id` int(11) DEFAULT '0' COMMENT '优惠券id',
  `claim_code` varchar(64) DEFAULT '' COMMENT '认养单号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_claim_text` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `cover` varchar(255) DEFAULT '',
  `title` varchar(255) DEFAULT '',
  `sub_title` varchar(255) DEFAULT '',
  `claim_id` int(11) DEFAULT '0',
  `time` varchar(64) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_config` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `appid` varchar(32) DEFAULT '',
  `appsecret` varchar(64) DEFAULT '',
  `app_name` varchar(255) DEFAULT '',
  `over_time` int(11) DEFAULT '300' COMMENT '订单超时取消',
  `cash_balance` int(11) DEFAULT '100' COMMENT ' 提现比列',
  `gzh_appid` varchar(64) DEFAULT '',
  `order_tmp_id` varchar(128) DEFAULT '' COMMENT '下单通知',
  `cancel_tmp_id` varchar(128) DEFAULT '',
  `max_day` int(11) DEFAULT '0' COMMENT '最长预约时间',
  `time_unit` int(11) DEFAULT '0' COMMENT '时长单位',
  `service_cover_time` int(11) DEFAULT '0' COMMENT '服务倒计时',
  `can_tx_time` int(11) DEFAULT '24' COMMENT '多少小时后可提现',
  `cash_mini` double(10,2) DEFAULT '0.01',
  `mobile` varchar(255) DEFAULT '',
  `text` longtext,
  `gzh_tplid` varchar(64) DEFAULT '',
  `auto_hx_time` int(11) DEFAULT '7',
  `app_day` int(11) DEFAULT '0' COMMENT '最长可以预约多少天内',
  `start_distance` double(10,2) DEFAULT '0.00' COMMENT '起送距离',
  `start_price` decimal(10,2) DEFAULT '0.00' COMMENT '起送费',
  `renew_distance` double(10,2) DEFAULT '0.00' COMMENT '每增加多少km',
  `renew_price` decimal(10,2) DEFAULT '0.00' COMMENT '续费多少元',
  `zt_address` varchar(255) DEFAULT '',
  `zt_lat` varchar(32) DEFAULT '',
  `zt_lng` varchar(32) DEFAULT '',
  `map_secret` varchar(255) DEFAULT '4IJBZ-DLACP-3QBDS-LI4FT-U2MZZ-5KFFA',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_coupon` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT '' COMMENT '名称',
  `type` tinyint(3) DEFAULT '0',
  `full` double(10,2) DEFAULT NULL COMMENT '满多少',
  `discount` double(10,2) DEFAULT NULL COMMENT '减多少',
  `rule` text COMMENT '规则',
  `text` text COMMENT '详情',
  `send_type` tinyint(3) DEFAULT '0' COMMENT '派发方式',
  `time_limit` tinyint(3) DEFAULT '0' COMMENT '时间限制',
  `start_time` bigint(12) DEFAULT '0',
  `end_time` bigint(12) DEFAULT '0',
  `day` int(11) DEFAULT '0' COMMENT '有效期',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(12) DEFAULT '0',
  `top` int(11) DEFAULT '0',
  `stock` int(11) DEFAULT '0' COMMENT '库存',
  `have_send` int(11) DEFAULT '0' COMMENT '已发多少张',
  `i` int(11) DEFAULT '0',
  `is_shop` tinyint(3) DEFAULT '0' COMMENT '支持商城',
  `is_land` tinyint(3) DEFAULT '0' COMMENT '支持土地',
  `is_claim` tinyint(3) DEFAULT '0' COMMENT '支持认养',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_coupon_record` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `coupon_id` int(11) DEFAULT '0',
  `title` varchar(225) DEFAULT '',
  `type` int(11) DEFAULT '0',
  `full` double(10,2) DEFAULT '0.00',
  `discount` double(10,2) DEFAULT '0.00',
  `start_time` bigint(12) DEFAULT '0',
  `end_time` bigint(13) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(12) DEFAULT '0',
  `num` int(11) DEFAULT '1',
  `use_time` bigint(11) DEFAULT '0',
  `order_id` int(11) DEFAULT '0',
  `pid` int(11) DEFAULT '0',
  `rule` text,
  `text` text,
  `is_show` tinyint(3) DEFAULT '1',
  `is_shop` tinyint(3) DEFAULT '0' COMMENT '支持商城',
  `is_land` tinyint(3) DEFAULT '0' COMMENT '支持土地',
  `is_claim` tinyint(3) DEFAULT '0' COMMENT '支持认养',
  `record_id` int(11) DEFAULT '0',
  `use_type` tinyint(3) DEFAULT '1' COMMENT '1商城 2土地 3认养',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_evaluate_list` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `order_id` int(11) DEFAULT '0',
  `user_id` int(11) DEFAULT '0',
  `star` int(11) DEFAULT '0' COMMENT '酒店评价',
  `text` varchar(625) CHARACTER SET utf8mb4 DEFAULT '',
  `imgs` text,
  `create_time` bigint(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `eva_type` int(11) DEFAULT '1' COMMENT '1好评，2中评，3差评',
  `type` int(11) DEFAULT '1' COMMENT '1认养2土地',
  `farmer_id` int(11) DEFAULT '0',
  `order_code` varchar(64) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_farmer` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0' COMMENT '用户id',
  `title` varchar(255) DEFAULT '' COMMENT '基地名称',
  `cover` varchar(255) DEFAULT '' COMMENT 'log',
  `desc` text CHARACTER SET utf8mb4 COMMENT '农场描述',
  `imgs` text COMMENT '轮播图',
  `mobile` varchar(32) DEFAULT '' COMMENT '联系电话',
  `address` varchar(255) DEFAULT '' COMMENT '地址',
  `lng` varchar(32) DEFAULT '0',
  `lat` varchar(32) DEFAULT '0',
  `user_name` varchar(255) DEFAULT '' COMMENT '姓名',
  `phone` varchar(32) DEFAULT '' COMMENT '手机号',
  `idcard_code` varchar(64) DEFAULT '' COMMENT '身份证号',
  `idcard_imgs` varchar(625) DEFAULT '' COMMENT '身份证正反面',
  `status` tinyint(3) DEFAULT '1',
  `text` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '审核意见',
  `create_time` bigint(11) DEFAULT '0',
  `sh_time` bigint(11) DEFAULT '0',
  `type` varchar(255) DEFAULT '1' COMMENT '1农场主 2店铺',
  `sh_text` varchar(1024) DEFAULT '',
  `cash` decimal(10,2) DEFAULT '0.00' COMMENT '佣金',
  `lock` int(11) DEFAULT '0',
  `star` decimal(10,1) DEFAULT '5.0',
  `iv` int(11) DEFAULT '0',
  `business_status` int(11) DEFAULT '0',
  `start_time` varchar(32) DEFAULT '',
  `end_time` varchar(32) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_farmer_finance_water` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `order_id` int(11) DEFAULT '0',
  `order_code` varchar(64) DEFAULT '',
  `user_id` int(11) DEFAULT '0',
  `farmer_id` int(11) DEFAULT '0',
  `price` decimal(10,2) DEFAULT '0.00',
  `add` tinyint(3) DEFAULT '1',
  `type` int(11) DEFAULT '0' COMMENT '1认养 2认养退款 3土地 4土地退款 5养殖 6养殖管理 7提现',
  `status` tinyint(11) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `create_date` varchar(32) DEFAULT '',
  `cash_status` tinyint(3) DEFAULT '0' COMMENT '-1无法入账 0暂停入账 1待入账 2已经入账',
  `cash_time` bigint(10) DEFAULT '0' COMMENT '佣金到账时间',
  `role_type` tinyint(3) DEFAULT '1' COMMENT '1 农场主',
  `landlord_id` int(11) DEFAULT '0' COMMENT '地主id',
  `store_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_farmer_wallet` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `farmer_id` int(11) DEFAULT '0',
  `pay_price` decimal(10,2) DEFAULT '0.00' COMMENT '申请提现的金额',
  `true_price` decimal(10,2) DEFAULT '0.00' COMMENT '实际到账金额',
  `balance` int(11) DEFAULT '0' COMMENT '提出比列',
  `create_time` bigint(11) DEFAULT '0',
  `status` int(11) DEFAULT '1',
  `is_show` tinyint(3) DEFAULT '1',
  `text` varchar(625) DEFAULT '',
  `order_code` varchar(64) DEFAULT '',
  `type` int(11) DEFAULT '1' COMMENT '1农场主提现',
  `online` int(11) DEFAULT '1' COMMENT '1线上打款 2线下',
  `sh_time` bigint(11) DEFAULT '0',
  `payment_no` varchar(64) DEFAULT '' COMMENT '微信打款单号',
  `store_id` int(11) DEFAULT '0' COMMENT '地主id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_land_cate` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT '',
  `top` int(11) DEFAULT '0',
  `status` int(11) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `type` int(11) DEFAULT '1' COMMENT '1土地分类 2认养分类',
  `is_public` int(11) DEFAULT '0' COMMENT '全选',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_land_cate_text` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `farmer_id` int(11) DEFAULT '0',
  `cate_id` int(11) DEFAULT '0',
  `type` int(11) DEFAULT '1' COMMENT '1土地分类 认养分类',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_land_cycle` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `land_id` int(11) DEFAULT '0',
  `cycle` int(11) DEFAULT '0' COMMENT '周期',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_land_list` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT '' COMMENT '土地名称',
  `cate_id` int(11) DEFAULT '0',
  `cover` varchar(255) DEFAULT '' COMMENT '封面图',
  `desc` text,
  `address` varchar(255) DEFAULT '' COMMENT '地址',
  `lat` varchar(32) DEFAULT '',
  `lng` varchar(32) DEFAULT '',
  `text` text CHARACTER SET utf8mb4 COMMENT '图文详情',
  `send_price` decimal(10,2) DEFAULT '0.00' COMMENT '配送费',
  `status` tinyint(3) DEFAULT '1',
  `user_id` int(11) DEFAULT '0',
  `create_time` bigint(11) DEFAULT '0',
  `farmer_id` int(11) DEFAULT '0',
  `sale_num` int(11) DEFAULT '0' COMMENT '销量',
  `imgs` text,
  `machine_id` int(11) DEFAULT '0' COMMENT '温控仪器id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_land_order` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `order_code` varchar(64) DEFAULT '',
  `user_id` int(11) DEFAULT NULL,
  `land_id` int(11) DEFAULT '0' COMMENT '土地id',
  `massif_id` int(11) DEFAULT '0' COMMENT '地块服务id',
  `pay_price` decimal(10,2) DEFAULT '0.00' COMMENT '支付价格',
  `farmer_id` int(11) DEFAULT '0' COMMENT '农场主',
  `spe_id` int(11) DEFAULT '0',
  `spe_name` varchar(255) DEFAULT '' COMMENT '规格名称',
  `area` double(10,2) DEFAULT '0.00' COMMENT '面积',
  `land_price` decimal(10,2) DEFAULT '0.00' COMMENT '土地价格',
  `cycle` int(11) DEFAULT '0' COMMENT '周期',
  `text` varchar(625) DEFAULT '' COMMENT '备注',
  `pay_type` tinyint(3) DEFAULT '1',
  `balance` decimal(10,2) DEFAULT '0.00' COMMENT '余额',
  `massif_title` varchar(255) DEFAULT '' COMMENT '土地服务名称',
  `massif_price` decimal(10,2) DEFAULT '0.00' COMMENT '土地服务价格',
  `total_massif_price` decimal(10,2) DEFAULT '0.00' COMMENT '土地服务总价格',
  `create_time` bigint(11) DEFAULT '0',
  `pay_time` bigint(11) DEFAULT '0',
  `transaction_id` varchar(128) DEFAULT '',
  `over_time` bigint(11) DEFAULT '0' COMMENT '订单超时退款时间',
  `discount_price` decimal(10,2) DEFAULT '0.00' COMMENT '优惠券抵扣价格',
  `coupon_id` int(11) DEFAULT '0' COMMENT '优惠券id',
  `rent_user_name` varchar(32) DEFAULT '' COMMENT '租赁人',
  `rent_mobile` varchar(32) DEFAULT '' COMMENT '租赁电话',
  `goods_name` varchar(64) DEFAULT '' COMMENT '土地',
  `goods_cover` varchar(255) DEFAULT '',
  `end_time` bigint(11) DEFAULT '0',
  `cancel_time` bigint(11) DEFAULT '0',
  `land_code` varchar(64) DEFAULT '' COMMENT '土地编号',
  `seed_price` decimal(10,2) DEFAULT '0.00',
  `send_type` int(11) DEFAULT '1',
  `have_notice` tinyint(3) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_land_order_seed` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `order_id` int(11) DEFAULT '0',
  `title` varchar(255) DEFAULT '' COMMENT '种子名称',
  `imgs` text COMMENT '封面图',
  `output_value` decimal(10,2) DEFAULT NULL COMMENT '产值',
  `month` varchar(64) DEFAULT '' COMMENT '月份季节',
  `area` decimal(10,2) DEFAULT '0.00' COMMENT '面积',
  `grow_cycle` int(11) DEFAULT '0' COMMENT '生长周期',
  `picking_cycle` int(11) DEFAULT '0' COMMENT '采摘周期',
  `seed_cycle` int(11) DEFAULT '0' COMMENT '种子周期',
  `seed_price` decimal(10,2) DEFAULT '0.00' COMMENT '种子价格',
  `num` int(11) DEFAULT '0',
  `total_price` decimal(10,2) DEFAULT '0.00',
  `seed_id` int(11) DEFAULT '0',
  `source_id` int(11) DEFAULT '0' COMMENT '溯源id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_land_source_text` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `obj_id` int(11) DEFAULT '0',
  `source_id` int(11) DEFAULT '0',
  `type` int(11) DEFAULT '1' COMMENT '1种子关联',
  `title` varchar(255) DEFAULT '',
  `cover` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_land_spe` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `land_id` int(11) DEFAULT '0',
  `spe_name` varchar(255) DEFAULT '',
  `area` decimal(10,2) DEFAULT '0.00',
  `price` decimal(10,2) DEFAULT '0.00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_land_text` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `land_id` int(11) DEFAULT '0',
  `obj_id` int(11) DEFAULT '0',
  `type` int(11) DEFAULT '1' COMMENT '1 地块服务 2关联种子 3关联溯源 4关联监控 5周期',
  `source_id` int(11) DEFAULT '0' COMMENT '关联种子的时候 还需要关联溯源',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_machine` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `land_id` int(11) DEFAULT '0',
  `farmer_id` int(11) DEFAULT '0',
  `room_id` int(11) DEFAULT '0',
  `title` varchar(64) DEFAULT '',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `type` tinyint(3) DEFAULT '1' COMMENT '1土地绑定 2 认养绑定',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_massif_list` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT '' COMMENT '地块名称',
  `price` decimal(10,2) DEFAULT '0.00' COMMENT '价格',
  `desc` varchar(625) DEFAULT '' COMMENT '简介',
  `status` tinyint(3) DEFAULT '1',
  `user_id` int(11) DEFAULT '0',
  `create_time` bigint(11) DEFAULT '0',
  `farmer_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_massif_service` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `cover` varchar(255) DEFAULT '',
  `title` varchar(255) DEFAULT '',
  `sub_title` varchar(255) DEFAULT '',
  `massif_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_monitor` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_monitor_text` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `obj_id` int(11) DEFAULT '0',
  `monitor_id` int(11) DEFAULT '0',
  `type` varchar(255) DEFAULT '1' COMMENT '1土地关联 2 认养关联 3 认养订单',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_oos_config` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) NOT NULL DEFAULT '0',
  `status` tinyint(4) NOT NULL DEFAULT '1',
  `miniapp_name` varchar(50) NOT NULL DEFAULT '',
  `open_oss` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0-本地 1-阿里云 2-七牛云  3--腾讯云',
  `aliyun_bucket` varchar(255) NOT NULL DEFAULT '' COMMENT '仓库',
  `aliyun_access_key_id` varchar(50) NOT NULL DEFAULT '' COMMENT '阿里云',
  `aliyun_access_key_secret` varchar(100) NOT NULL DEFAULT '' COMMENT '阿里云',
  `aliyun_base_dir` varchar(200) NOT NULL DEFAULT '' COMMENT '图片等资源存储根目录',
  `aliyun_zidinyi_yuming` varchar(255) NOT NULL DEFAULT '' COMMENT '自定义域名',
  `aliyun_endpoint` varchar(255) NOT NULL DEFAULT '',
  `aliyun_rules` text COMMENT '阿里云的规则配置',
  `qiniu_accesskey` varchar(100) NOT NULL DEFAULT '' COMMENT '七牛云秘钥',
  `qiniu_secretkey` varchar(100) NOT NULL DEFAULT '' COMMENT '七牛云秘钥',
  `qiniu_bucket` varchar(50) NOT NULL DEFAULT '' COMMENT '七牛云仓库',
  `qiniu_yuming` varchar(255) NOT NULL DEFAULT '' COMMENT '七牛自定义域名  前面要加http://',
  `qiniu_rules` text COMMENT '七牛的规则配置',
  `tenxunyun_appid` varchar(20) NOT NULL DEFAULT '' COMMENT '腾讯云的appid',
  `tenxunyun_secretid` varchar(50) NOT NULL DEFAULT '' COMMENT '腾讯云secretid',
  `tenxunyun_secretkey` varchar(50) NOT NULL DEFAULT '' COMMENT '腾讯云的配置',
  `tenxunyun_bucket` varchar(50) NOT NULL DEFAULT '' COMMENT '腾讯云图片仓库',
  `tenxunyun_region` varchar(50) NOT NULL DEFAULT '' COMMENT '腾讯云地域',
  `tenxunyun_yuming` varchar(300) NOT NULL DEFAULT '' COMMENT '腾讯云域名',
  `apiclient_cert` varchar(200) NOT NULL DEFAULT '',
  `apiclient_key` varchar(200) NOT NULL DEFAULT '' COMMENT '两个证书文件路径',
  `create_time` int(11) NOT NULL DEFAULT '0',
  `update_time` int(11) NOT NULL DEFAULT '0',
  `delete_time` int(11) DEFAULT NULL COMMENT '删除时间',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `is_sync` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否同步',
  `name` varchar(64) NOT NULL DEFAULT '' COMMENT '储蓄名字',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_order_address` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `order_id` int(11) DEFAULT '0',
  `user_name` varchar(64) DEFAULT '',
  `mobile` varchar(32) DEFAULT '',
  `province` varchar(64) DEFAULT '',
  `city` varchar(64) DEFAULT '',
  `area` varchar(64) DEFAULT '',
  `lng` varchar(32) DEFAULT '0',
  `lat` varchar(32) DEFAULT '0',
  `address` varchar(255) DEFAULT '',
  `address_info` varchar(625) DEFAULT '',
  `zt_name` varchar(255) DEFAULT '' COMMENT '自提点点名称',
  `zt_mobile` varchar(32) DEFAULT '' COMMENT '自提点电话',
  `type` tinyint(3) DEFAULT '1' COMMENT '1 租地下单',
  `send_type` tinyint(3) DEFAULT '2' COMMENT '1自提 2快递',
  `address_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_pay_config` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `uniacid` int(10) NOT NULL DEFAULT '0' COMMENT '小程序关联id',
  `mch_id` varchar(255) NOT NULL DEFAULT '' COMMENT '商户号',
  `pay_key` varchar(255) NOT NULL DEFAULT '' COMMENT '支付秘钥',
  `cert_path` varchar(255) NOT NULL DEFAULT '' COMMENT '证书',
  `key_path` varchar(255) NOT NULL DEFAULT '' COMMENT '证书',
  `min_price` int(6) NOT NULL DEFAULT '0' COMMENT '最低提现金额',
  `pay_name` varchar(255) NOT NULL DEFAULT 'wechat' COMMENT '支付类型',
  `create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_school_admin` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `username` varchar(255) DEFAULT '',
  `passwd` varchar(255) DEFAULT '',
  `create_time` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_seed` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT '' COMMENT '名称',
  `imgs` text,
  `output_value` decimal(10,2) DEFAULT '0.00' COMMENT '产值',
  `month` int(11) DEFAULT '0' COMMENT '月份季节',
  `area` decimal(10,2) DEFAULT '0.00' COMMENT '面积',
  `grow_cycle` decimal(10,1) DEFAULT '0.0' COMMENT '生长周期',
  `picking_cycle` decimal(10,1) DEFAULT '0.0' COMMENT '采摘周期',
  `seed_cycle` decimal(10,1) DEFAULT '0.0' COMMENT '种子周期',
  `seed_price` decimal(10,2) DEFAULT '0.00' COMMENT '种子价格',
  `user_id` int(11) DEFAULT '0',
  `status` int(11) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `top` int(11) DEFAULT '0',
  `farmer_id` int(11) DEFAULT '0',
  `sale_num` int(11) DEFAULT '0' COMMENT '销量',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_seed_month` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `seed_id` int(11) DEFAULT '0',
  `month` int(11) DEFAULT '0',
  `season` int(11) DEFAULT '0' COMMENT '季节',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_send_order` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `order_id` int(11) DEFAULT '0',
  `user_id` int(11) DEFAULT '0',
  `pay_type` tinyint(3) DEFAULT '1',
  `pay_price` decimal(10,2) DEFAULT '0.00' COMMENT '配送费',
  `order_code` varchar(64) DEFAULT '',
  `start_time` bigint(11) DEFAULT '0' COMMENT '配送信息',
  `end_time` bigint(11) DEFAULT '0' COMMENT '配送时间',
  `send_type` tinyint(3) DEFAULT '1' COMMENT '配送方式 1自提 2快递',
  `address` varchar(255) DEFAULT '' COMMENT '地址信息',
  `user_name` varchar(64) DEFAULT '' COMMENT '用户名字',
  `mobile` varchar(32) DEFAULT '' COMMENT '电话',
  `farmer_id` int(11) DEFAULT '0',
  `text` varchar(625) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '备注信息',
  `create_time` bigint(11) DEFAULT '0',
  `transaction_id` varchar(64) DEFAULT '',
  `over_time` bigint(11) DEFAULT '0',
  `type` tinyint(3) DEFAULT '1' COMMENT '1认养 2土地',
  `lat` varchar(32) DEFAULT '',
  `distance` double(10,2) DEFAULT '0.00' COMMENT '距离',
  `balance` double(10,2) DEFAULT '0.00',
  `lng` varchar(32) DEFAULT '',
  `pay_time` bigint(11) DEFAULT '0',
  `times` int(11) DEFAULT '0',
  `refund_time` bigint(11) DEFAULT '0' COMMENT '退款时间',
  `refund` tinyint(3) DEFAULT '0',
  `refund_code` varchar(255) DEFAULT '' COMMENT '退款单号',
  `send_time` bigint(11) DEFAULT '0' COMMENT '发货时间',
  `receiving_time` bigint(11) DEFAULT '0' COMMENT '收货时间',
  `hx_user` int(11) DEFAULT '0',
  `hx_admin` tinyint(3) DEFAULT '0',
  `auto_receiving_time` bigint(11) DEFAULT '0' COMMENT '自动收货时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_send_time_config` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `start_time` varchar(32) DEFAULT '',
  `end_time` varchar(32) DEFAULT '',
  `status` tinyint(3) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_shop_goods` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `goods_name` varchar(128) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '商品名字',
  `cate_id` int(11) DEFAULT '0' COMMENT '分类id',
  `cover` varchar(255) DEFAULT '' COMMENT '封面图',
  `imgs` text COMMENT '轮播图',
  `text` text COMMENT '商品描述',
  `status` tinyint(3) DEFAULT '1',
  `index_show` tinyint(3) DEFAULT '0',
  `top` int(11) DEFAULT '0',
  `store` int(11) DEFAULT '0' COMMENT '门店id',
  `user_id` int(11) DEFAULT '0' COMMENT '用户id',
  `user_type` int(11) DEFAULT '1' COMMENT '1农场主 2地主',
  `create_time` int(11) DEFAULT '0',
  `sale_num` int(11) unsigned DEFAULT '0' COMMENT '销量',
  `lock` int(11) DEFAULT '0' COMMENT '版本号',
  `refund_num` int(11) DEFAULT '0' COMMENT '退款数量',
  `farmer_id` int(11) DEFAULT '0' COMMENT '农场主id',
  `source_id` int(11) DEFAULT '0' COMMENT '溯源id',
  `true_sale_num` int(11) DEFAULT '0',
  `send_tmpl_id` int(11) DEFAULT '0' COMMENT '运费模版id',
  `weight` decimal(10,2) DEFAULT '0.00' COMMENT '重量',
  `desc` varchar(625) DEFAULT '',
  `video` varchar(255) DEFAULT '',
  `image_url` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_shop_goods_cate` (
 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `store_id` int(11) DEFAULT NULL,
  `title` varchar(64) DEFAULT '',
  `status` tinyint(3) DEFAULT '1',
  `top` int(11) DEFAULT '0',
  `create_time` bigint(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_shop_goods_sh` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `cap_id` int(11) DEFAULT '0',
  `user_type` int(11) DEFAULT '1' COMMENT '1农场主 2地主',
  `create_time` bigint(11) DEFAULT '0',
  `order_code` varchar(64) DEFAULT '',
  `status` tinyint(3) DEFAULT '1',
  `sh_text` varchar(625) DEFAULT '',
  `goods_cate` varchar(255) DEFAULT '',
  `auto` tinyint(3) DEFAULT '0',
  `sh_time` bigint(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_shop_goods_sh_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `sh_id` int(11) DEFAULT '0' COMMENT '审核id',
  `goods_id` int(11) DEFAULT '0',
  `goods_name` varchar(255) DEFAULT '' COMMENT '商品列表',
  `cate_id` int(11) DEFAULT '0' COMMENT '分类id',
  `cover` varchar(255) DEFAULT '' COMMENT '封面图',
  `imgs` text COMMENT '轮播图',
  `text` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_shop_goods_sh_spe` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `sh_goods_id` int(11) DEFAULT '0',
  `title` varchar(225) DEFAULT '',
  `stock` int(11) DEFAULT '0',
  `price` double(10,2) DEFAULT '0.00',
  `spe_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_shop_goods_spe` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(64) DEFAULT '',
  `stock` int(11) unsigned DEFAULT '0',
  `price` double(10,2) DEFAULT '0.00',
  `goods_id` int(11) DEFAULT '0',
  `lock` int(11) DEFAULT '0' COMMENT '版本号',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_shop_order` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `farmer_id` int(11) DEFAULT '0',
  `order_code` varchar(64) DEFAULT '' COMMENT '订单号',
  `together` tinyint(3) DEFAULT '1' COMMENT '是否一起支付的',
  `top_order_code` varchar(64) DEFAULT '',
  `store_id` int(11) DEFAULT '0',
  `user_id` int(11) DEFAULT '0' COMMENT '用户id',
  `send_type` tinyint(3) DEFAULT '2' COMMENT '1快递 2自提',
  `pay_type` tinyint(3) DEFAULT '1' COMMENT '订单状态',
  `total_price` decimal(10,2) DEFAULT '0.00',
  `balance` double(10,2) DEFAULT '0.00' COMMENT '余额支付',
  `pay_price` double(10,2) DEFAULT '0.00' COMMENT '支付金额',
  `true_price` decimal(10,2) DEFAULT '0.00',
  `goods_price` double(10,2) DEFAULT '0.00' COMMENT '商品价格',
  `init_price` double(10,2) DEFAULT '0.00' COMMENT '原价',
  `init_goods_price` decimal(10,2) DEFAULT '0.00',
  `freight` decimal(10,2) DEFAULT '0.00',
  `discount` double(10,2) DEFAULT '0.00' COMMENT '折扣',
  `distance` decimal(10,2) DEFAULT '0.00',
  `transaction_id` varchar(64) DEFAULT '',
  `text` varchar(625) DEFAULT '',
  `hx_user` int(11) DEFAULT '0',
  `qr` varchar(255) DEFAULT '',
  `mobile` varchar(32) DEFAULT '',
  `coupon_id` int(11) DEFAULT '0',
  `auto_refund` tinyint(3) DEFAULT '0' COMMENT '自动取消订单',
  `have_tx` int(11) DEFAULT '0',
  `is_show` tinyint(11) DEFAULT '1',
  `create_time` int(11) DEFAULT '0',
  `pay_time` int(11) DEFAULT '0',
  `end_time` bigint(11) DEFAULT '0' COMMENT '订单取消时间',
  `hx_time` bigint(11) DEFAULT '0' COMMENT '核销时间',
  `over_time` bigint(11) DEFAULT '0',
  `can_refund_time` bigint(11) DEFAULT '0' COMMENT '可申请退款时间',
  `hx_over_time` bigint(11) DEFAULT '0',
  `send_start_time` bigint(11) DEFAULT '0',
  `send_end_time` bigint(11) DEFAULT '0',
  `cancel_time` bigint(11) DEFAULT '0' COMMENT '取消时间',
  `farmer_show` tinyint(3) DEFAULT '0',
  `express_company` varchar(64) DEFAULT '' COMMENT '快递公司',
  `express_code` varchar(128) DEFAULT '' COMMENT '快递电话',
  `express_mobile` varchar(32) DEFAULT '' COMMENT '快递电话',
  `express_user` varchar(32) DEFAULT '' COMMENT '快递员',
  `send_time` bigint(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_shop_order_goods` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `order_id` int(11) DEFAULT NULL,
  `pay_type` int(11) DEFAULT '1' COMMENT '状态',
  `goods_name` varchar(255) DEFAULT '' COMMENT '商品名字',
  `goods_cover` varchar(255) DEFAULT '' COMMENT '商品封面图',
  `spe_name` varchar(255) DEFAULT '' COMMENT '规格名',
  `goods_price` decimal(10,2) DEFAULT '0.00' COMMENT '价格',
  `pay_price` decimal(10,2) DEFAULT '0.00' COMMENT '实际支付价格',
  `goods_num` int(11) DEFAULT '0' COMMENT '数量',
  `can_refund_num` int(11) DEFAULT NULL COMMENT '可退款数量',
  `spe_id` int(11) DEFAULT '0',
  `goods_id` int(11) DEFAULT '0',
  `user_id` int(11) DEFAULT '0',
  `singe_pay_price` decimal(10,2) DEFAULT '0.00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_shop_refund_order` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `order_code` varchar(64) DEFAULT '',
  `order_id` int(11) DEFAULT '0',
  `user_id` int(11) DEFAULT '0',
  `transaction_id` varchar(64) DEFAULT '',
  `store_id` int(11) DEFAULT '0' COMMENT '教练',
  `pay_price` double(10,2) DEFAULT '0.00',
  `apply_price` double(10,2) DEFAULT '0.00',
  `refund_price` double(10,2) DEFAULT '0.00',
  `status` int(11) DEFAULT '1',
  `text` varchar(625) DEFAULT '',
  `refund_text` varchar(625) DEFAULT '',
  `create_time` bigint(12) DEFAULT '0',
  `refund_time` bigint(12) DEFAULT '0',
  `balance` double(10,2) DEFAULT '0.00',
  `cancel_time` bigint(11) DEFAULT '0',
  `out_refund_no` varchar(64) DEFAULT '',
  `imgs` varchar(1024) DEFAULT '',
  `car_price` double(10,2) DEFAULT '0.00',
  `time_long` int(11) DEFAULT '0' COMMENT '退款服务时长',
  `service_price` double(10,2) DEFAULT '0.00',
  `total_circle` int(11) DEFAULT '0' COMMENT '总圈数',
  `refund_user` int(11) DEFAULT '0',
  `refund_user_admin` tinyint(3) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_shop_refund_order_goods` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `refund_id` int(11) DEFAULT '0',
  `goods_id` int(11) DEFAULT '0',
  `goods_name` varchar(255) DEFAULT '',
  `goods_cover` varchar(255) DEFAULT '',
  `goods_price` decimal(10,2) DEFAULT '0.00',
  `goods_num` int(11) DEFAULT '1',
  `order_goods_id` int(11) DEFAULT '0',
  `order_id` int(11) DEFAULT '0',
  `status` int(11) DEFAULT '0',
  `spe_name` varchar(255) DEFAULT '',
  `spe_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_source` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `title` varchar(255) DEFAULT '' COMMENT '名称',
  `status` int(11) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `farmer_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_source_text` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `source_id` int(11) DEFAULT '0' COMMENT '溯源id',
  `stage` varchar(255) DEFAULT '',
  `cover` varchar(255) DEFAULT '',
  `time` bigint(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_tmp_list` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `model_name` varchar(255) NOT NULL DEFAULT '0' COMMENT '模块名',
  `model_key` varchar(255) NOT NULL DEFAULT '0' COMMENT '模块key',
  `tmpl_id` varchar(255) NOT NULL DEFAULT '0' COMMENT '模版id',
  `tmpl_name` varchar(255) NOT NULL DEFAULT '0' COMMENT '模版名字',
  `create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(11) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `tid` int(11) NOT NULL DEFAULT '0' COMMENT '模版消息的标题id',
  `kidList` varchar(255) NOT NULL DEFAULT '0' COMMENT '模版消息的内容',
  `sceneDesc` varchar(255) NOT NULL DEFAULT '0' COMMENT '模版消息场景',
  `kid` varchar(255) NOT NULL DEFAULT '0' COMMENT '生成模版类容时候需要传的',
  `example` varchar(255) NOT NULL DEFAULT '0' COMMENT '样板内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_user_list` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `openid` varchar(64) NOT NULL DEFAULT '',
  `nickName` varchar(255) CHARACTER SET utf8mb4 DEFAULT '',
  `avatarUrl` varchar(255) DEFAULT '',
  `create_time` bigint(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `cap_id` int(11) DEFAULT '0',
  `city` varchar(255) DEFAULT '',
  `country` varchar(255) DEFAULT '',
  `gender` int(11) DEFAULT '0',
  `language` varchar(32) DEFAULT '',
  `province` varchar(128) DEFAULT '',
  `balance` double(10,2) DEFAULT '0.00' COMMENT '余额',
  `phone` varchar(32) DEFAULT '',
  `session_key` varchar(255) DEFAULT '',
  `pid` int(11) DEFAULT '0',
  `cash` double(10,2) DEFAULT '0.00' COMMENT '分销佣金',
  `role` int(11) DEFAULT '0',
  `integral` decimal(10,2) DEFAULT '0.00',
  `vip_time` bigint(11) DEFAULT '0',
  `member_level` int(11) DEFAULT '0' COMMENT '会员等级',
  `lock` int(11) DEFAULT '0',
  `wallet_cash` decimal(10,2) DEFAULT '0.00' COMMENT '可提现金额（地主收入）',
  `is_landlord` tinyint(3) DEFAULT '0' COMMENT '是否是地主',
  `landlord_cash` decimal(10,2) DEFAULT '0.00' COMMENT '地主收入',
  `create_date` varchar(32) DEFAULT '',
  `year` int(11) DEFAULT '0',
  `month` int(11) DEFAULT '0',
  `week` int(11) DEFAULT '0',
  `last_store_id` int(11) DEFAULT '0' COMMENT '上次访问门店的id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `openid` (`openid`,`uniacid`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_wechat_code` (
  `id` char(32) NOT NULL DEFAULT '',
  `uniacid` int(11) NOT NULL DEFAULT '0' COMMENT 'uniacid',
  `data` text COMMENT '数据',
  `create_time` int(11) DEFAULT NULL COMMENT '创建时间',
  `update_time` int(11) DEFAULT NULL COMMENT '更新时间',
  `delete_time` int(11) DEFAULT NULL COMMENT '删除时间',
  `deleted` tinyint(1) DEFAULT '0' COMMENT '1：已回收；0：可用；',
  `path` varchar(500) DEFAULT '',
  `count` int(11) DEFAULT '0' COMMENT '扫码次数',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


ALTER TABLE `{$prefix}lbfarm_shop_refund_order_goods` modify column `goods_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';
ALTER TABLE `{$prefix}lbfarm_shop_refund_order_goods` modify column `spe_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';
ALTER TABLE `{$prefix}lbfarm_source` modify column `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '名称';
ALTER TABLE `{$prefix}lbfarm_land_spe` modify column `spe_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';
ALTER TABLE `{$prefix}lbfarm_claim_text` modify column `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_claim_text` modify column `sub_title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_claim_text` modify column `time` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_land_list` modify column `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '土地名称';
ALTER TABLE `{$prefix}lbfarm_land_list` modify column `desc` text CHARACTER SET utf8mb4;

ALTER TABLE `{$prefix}lbfarm_land_list` modify column `address` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '地址';


ALTER TABLE `{$prefix}lbfarm_claim` modify column `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_claim` modify column `harvest_text` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '收货';

ALTER TABLE `{$prefix}lbfarm_claim` modify column `address` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '地址';

ALTER TABLE `{$prefix}lbfarm_claim` modify column `send_cycle` varchar(64)CHARACTER SET utf8mb4 DEFAULT '' COMMENT '配送周期';

ALTER TABLE `{$prefix}lbfarm_claim` modify column `desc` varchar(625)CHARACTER SET utf8mb4 DEFAULT '' COMMENT '简介';

ALTER TABLE `{$prefix}lbfarm_claim` modify column `unit` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '单位';

ALTER TABLE `{$prefix}lbfarm_claim` modify column `breed` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '品种';

ALTER TABLE `{$prefix}lbfarm_claim_order` modify column `goods_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_claim_order` modify column `breed` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_claim_order` modify column `unit` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_breed` modify column `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_breed_order_goods` modify column `goods_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_seed` modify column `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '名称';

ALTER TABLE `{$prefix}lbfarm_breed` modify column `sub_title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '名称';

ALTER TABLE `{$prefix}lbfarm_shop_goods` modify column `goods_name` varchar(128) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '商品名字';

ALTER TABLE `{$prefix}lbfarm_shop_order_goods` modify column `goods_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '商品名字';

ALTER TABLE `{$prefix}lbfarm_shop_order_goods` modify column `spe_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '规格名';

ALTER TABLE `{$prefix}lbfarm_shop_order_goods` modify column `breed` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '品种';

ALTER TABLE `{$prefix}lbfarm_shop_order_goods` modify column `desc` varchar(625) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '品种';

ALTER TABLE `{$prefix}lbfarm_shop_order_goods` modify column `text` text CHARACTER SET utf8mb4 COMMENT '商品描述';

ALTER TABLE `{$prefix}lbfarm_land_order` modify column `spe_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '规格名称';

ALTER TABLE `{$prefix}lbfarm_land_order` modify column `text` varchar(625) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '备注';

ALTER TABLE `{$prefix}lbfarm_land_order` modify column `massif_title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '土地服务名称';

ALTER TABLE `{$prefix}lbfarm_land_order` modify column `goods_name` varchar(64) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '土地';

ALTER TABLE `{$prefix}lbfarm_land_spe` modify column `spe_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_land_source_text` modify column `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_massif_list` modify column `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '地块名称';

ALTER TABLE `{$prefix}lbfarm_massif_list` modify column `desc` varchar(625) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '简介';

ALTER TABLE `{$prefix}lbfarm_massif_service` modify column `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_massif_service` modify column `sub_title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_claim_order` modify column `harvest_text` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_claim_order` modify column `send_cycle` varchar(64) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '配送周期';

ALTER TABLE `{$prefix}lbfarm_claim_order` modify column `text` varchar(625) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '备注';

ALTER TABLE `{$prefix}lbfarm_source_text` modify column `stage` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_farmer` modify column `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '基地名称';

ALTER TABLE `{$prefix}lbfarm_farmer` modify column `user_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '姓名';

ALTER TABLE `{$prefix}lbfarm_breed_order` modify column `text` varchar(625) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_address` modify column `user_name` varchar(64) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_address` modify column `address` varchar(255) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_address` modify column `address_info` varchar(625) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_order_address` modify column `user_name` varchar(64) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_order_address` modify column `address` varchar(225) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_order_address` modify column `address_info` varchar(625) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_order_address` modify column `zt_name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '自提点点名称';

ALTER TABLE `{$prefix}lbfarm_farmer_wallet` modify column `text` varchar(625) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_claim_order` modify column `name` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '用户给认养取的名字';

ALTER TABLE `{$prefix}lbfarm_land_order` modify column `rent_user_name` varchar(32) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '租赁人';

ALTER TABLE `{$prefix}lbfarm_send_order` modify column `user_name` varchar(64) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '用户名字';

ALTER TABLE `{$prefix}lbfarm_send_order` modify column `address` varchar(225) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '地址';

ALTER TABLE `{$prefix}lbfarm_land_order_seed` modify column `title` varchar(255) CHARACTER SET utf8mb4 DEFAULT '' COMMENT '种子名称';

ALTER TABLE `{$prefix}lbfarm_shop_goods_spe` modify column `price` decimal(10,2) DEFAULT '0.00';

ALTER TABLE `{$prefix}lbfarm_monitor_text` modify column `id` int(11) unsigned NOT NULL AUTO_INCREMENT;

ALTER TABLE `{$prefix}lbfarm_shop_order` modify column `text` varchar(625) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_shop_refund_order` modify column `text` varchar(625) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_shop_refund_order` modify column `refund_text` varchar(625) CHARACTER SET utf8mb4 DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_shop_refund_order` modify column `pay_price` decimal(10,2) DEFAULT '0.00';

ALTER TABLE `{$prefix}lbfarm_shop_refund_order` modify column `apply_price` decimal(10,2) DEFAULT '0.00';

ALTER TABLE `{$prefix}lbfarm_shop_refund_order` modify column `refund_price` decimal(10,2) DEFAULT '0.00';

ALTER TABLE `{$prefix}lbfarm_shop_refund_order` modify column `car_price` decimal(10,2) DEFAULT '0.00';

ALTER TABLE `{$prefix}lbfarm_shop_refund_order` modify column `balance` decimal(10,2) DEFAULT '0.00';

ALTER TABLE `{$prefix}lbfarm_shop_goods_spe` ADD COLUMN `init_price` decimal(10,2) DEFAULT '0.00';

ALTER TABLE `{$prefix}lbfarm_monitor` ADD COLUMN `farmer_id` int(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_monitor` ADD COLUMN `deviceSerial` varchar(255) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_monitor` ADD COLUMN `channelNo` varchar(32) DEFAULT '1';

ALTER TABLE `{$prefix}lbfarm_monitor` ADD COLUMN `status` tinyint(3) DEFAULT '1';

ALTER TABLE `{$prefix}lbfarm_monitor` ADD COLUMN `create_time` bigint(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_monitor` ADD COLUMN `title` varchar(255) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_monitor` ADD COLUMN `cover` varchar(255) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_monitor` ADD COLUMN `iv` int(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `ys_appkey` varchar(128) DEFAULT '' COMMENT '萤石云appid';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `ys_secret` varchar(128) DEFAULT '' COMMENT '萤石云密钥';

ALTER TABLE `{$prefix}lbfarm_shop_refund_order` ADD COLUMN `farmer_id` int(11) DEFAULT '0';


ALTER TABLE `{$prefix}lbfarm_school_admin` ADD COLUMN `is_admin` tinyint(3) DEFAULT '1' COMMENT '超级管理员';

ALTER TABLE `{$prefix}lbfarm_school_admin` ADD COLUMN `status` tinyint(3) DEFAULT '1';

ALTER TABLE `{$prefix}lbfarm_school_admin` ADD COLUMN `o_passwd` varchar(255) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN `app_openid` varchar(64) DEFAULT '' COMMENT 'appopenid';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN `wechat_openid` varchar(64) DEFAULT '' COMMENT '小程序openid';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN `last_login_type` tinyint(3) DEFAULT '0' COMMENT '0小程序 1app 2web';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN `web_openid` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN `unionid` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `app_app_id` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `app_app_secret` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `web_app_id` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `web_app_secret` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `app_banner` text;

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `login_protocol` text;


ALTER TABLE `{$prefix}lbfarm_land_list` ADD COLUMN `video` varchar(255) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_land_list` ADD COLUMN `send_tmpl_id` int(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_claim` ADD COLUMN `send_tmpl_id` int(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_land_list` ADD COLUMN `is_fx` tinyint(3) DEFAULT '0' COMMENT '是否开启分销';

ALTER TABLE `{$prefix}lbfarm_land_list` ADD COLUMN `one_fx` decimal(10,2) DEFAULT '0.00' COMMENT '一级分销';

ALTER TABLE `{$prefix}lbfarm_land_list` ADD COLUMN `two_fx` decimal(10,2) DEFAULT '0.00' COMMENT '二级分销';

ALTER TABLE `{$prefix}lbfarm_claim` ADD COLUMN `video` varchar(255) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_claim` ADD COLUMN `top` int(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_breed` ADD COLUMN `top` int(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_claim` ADD COLUMN `is_self` tinyint(3) DEFAULT '0' COMMENT '是否支持自提';

ALTER TABLE `{$prefix}lbfarm_claim` ADD COLUMN `is_send` tinyint(3) DEFAULT '0' COMMENT '是否支持配送';

ALTER TABLE `{$prefix}lbfarm_land_list` ADD COLUMN `top` int(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_claim` ADD COLUMN `is_fx` tinyint(3) DEFAULT '0' COMMENT '是否开启分销';

ALTER TABLE `{$prefix}lbfarm_claim` ADD COLUMN `one_fx` decimal(10,2) DEFAULT '0.00' COMMENT '一级分销';

ALTER TABLE `{$prefix}lbfarm_claim` ADD COLUMN `two_fx` decimal(10,2) DEFAULT '0.00' COMMENT '二级分销';

ALTER TABLE `{$prefix}lbfarm_farmer` ADD COLUMN `store_time` bigint(11) DEFAULT '0' COMMENT '开店时间';

ALTER TABLE `{$prefix}lbfarm_farmer` ADD COLUMN `is_admin` tinyint(3) DEFAULT '0' COMMENT '是否是后台创建';

ALTER TABLE `{$prefix}lbfarm_shop_goods` ADD COLUMN `is_fx` tinyint(3) DEFAULT '0' COMMENT '是否开启分销';

ALTER TABLE `{$prefix}lbfarm_shop_goods` ADD COLUMN `one_fx` decimal(10,2) DEFAULT '0.00' COMMENT '一级分销';

ALTER TABLE `{$prefix}lbfarm_shop_goods` ADD COLUMN `two_fx` decimal(10,2) DEFAULT '0.00' COMMENT '二级分销';

ALTER TABLE `{$prefix}lbfarm_shop_goods` ADD COLUMN `desc` varchar(625) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_farmer` ADD COLUMN `index_show` tinyint(3) DEFAULT '0' COMMENT '首页展示';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `blacklist` tinyint(3) DEFAULT '0' COMMENT '黑名单功能';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN `is_black` tinyint(3) DEFAULT '0' COMMENT '是否在黑名单';

ALTER TABLE `{$prefix}lbfarm_balance_card` ADD COLUMN `cash_type` tinyint(3) DEFAULT '1' COMMENT '1比列，2固定提层';

ALTER TABLE `{$prefix}lbfarm_balance_card` ADD COLUMN `cash_balance` decimal(10,2) DEFAULT '0.00' COMMENT '比列';

ALTER TABLE `{$prefix}lbfarm_balance_card` ADD COLUMN `cash` decimal(10,2) DEFAULT '0.00' COMMENT '抽层';

ALTER TABLE `{$prefix}lbfarm_balance_card` ADD COLUMN `integral` decimal(10,2) DEFAULT '0.00' COMMENT '积分';

ALTER TABLE `{$prefix}lbfarm_balance_order_list` ADD COLUMN `integral` decimal(10,2) DEFAULT '0.00' COMMENT '积分';

ALTER TABLE `{$prefix}lbfarm_shop_order` ADD COLUMN `get_integral` decimal(10,2) DEFAULT '0.00' COMMENT '获取积分';

ALTER TABLE `{$prefix}lbfarm_land_order` ADD COLUMN `get_integral` decimal(10,2) DEFAULT '0.00' COMMENT '获取积分';

ALTER TABLE `{$prefix}lbfarm_claim_order` ADD COLUMN `get_integral` decimal(10,2) DEFAULT '0.00' COMMENT '获取积分';

ALTER TABLE `{$prefix}lbfarm_send_order` ADD COLUMN `get_integral` decimal(10,2) DEFAULT '0.00' COMMENT '获取积分';

ALTER TABLE `{$prefix}lbfarm_breed_order` ADD COLUMN `get_integral` decimal(10,2) DEFAULT '0.00' COMMENT '获取积分';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `information_protection` longtext COMMENT '个人信息保护';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `app_logo` varchar(255) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `app_text` varchar(255) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_shop_order` ADD COLUMN `integral` decimal(10,2) DEFAULT '0.00' COMMENT '使用积分';

ALTER TABLE `{$prefix}lbfarm_shop_order` ADD COLUMN `integral_discount_price` decimal(10,2) DEFAULT '0.00' COMMENT '积分抵扣多少钱';


ALTER TABLE `{$prefix}lbfarm_shop_order_goods` ADD COLUMN `integral` decimal(10,2) DEFAULT '0.00';

ALTER TABLE `{$prefix}lbfarm_shop_order_goods` ADD COLUMN `i_price` decimal(10,2) DEFAULT '0.00';

ALTER TABLE `{$prefix}lbfarm_shop_order_goods` ADD COLUMN `integral_id` int(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_shop_order_goods` ADD COLUMN `kill_atv_id` int(11) DEFAULT '0' COMMENT '秒杀活动id';

ALTER TABLE `{$prefix}lbfarm_shop_order` ADD COLUMN `kill_atv_id` int(11) DEFAULT '0' COMMENT '秒杀活动id';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN  `fx_code` varchar(32) DEFAULT '' COMMENT '分校码';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN  `is_fx` tinyint(3) DEFAULT '0' COMMENT '是否是分销员';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN  `sign_notice` tinyint(3) DEFAULT '0' COMMENT '签到提醒';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN  `fx_cash` decimal(10,2) DEFAULT '0.00' COMMENT '分销佣金';

ALTER TABLE `{$prefix}lbfarm_shop_order` ADD COLUMN  `pay_model` tinyint(3) DEFAULT '1' COMMENT '1微信2余额 3支付宝';

ALTER TABLE `{$prefix}lbfarm_land_order` ADD COLUMN  `pay_model` tinyint(3) DEFAULT '1' COMMENT '1微信2余额 3支付宝';

ALTER TABLE `{$prefix}lbfarm_claim_order` ADD COLUMN  `pay_model` tinyint(3) DEFAULT '1' COMMENT '1微信2余额 3支付宝';

ALTER TABLE `{$prefix}lbfarm_breed_order` ADD COLUMN  `pay_model` tinyint(3) DEFAULT '1' COMMENT '1微信2余额 3支付宝';

ALTER TABLE `{$prefix}lbfarm_balance_order_list` ADD COLUMN  `pay_model` tinyint(3) DEFAULT '1' COMMENT '1微信2余额 3支付宝';

ALTER TABLE `{$prefix}lbfarm_send_order` ADD COLUMN  `pay_model` tinyint(3) DEFAULT '1' COMMENT '1微信2余额 3支付宝';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN  `fx_bind_time` bigint(11) DEFAULT '0' COMMENT '分销绑定时间';

ALTER TABLE `{$prefix}lbfarm_shop_order` ADD COLUMN  `kill_discount_price` decimal(10,2) DEFAULT '0.00' COMMENT '秒杀优惠';

ALTER TABLE `{$prefix}lbfarm_shop_order` ADD COLUMN  `video` varchar(255) DEFAULT '' COMMENT '视频';

ALTER TABLE `{$prefix}lbfarm_land_list` ADD COLUMN  `weight` decimal(10,2) DEFAULT '0.00' COMMENT '重量';

ALTER TABLE `{$prefix}lbfarm_claim` ADD COLUMN `weight` decimal(10,2) DEFAULT '0.00' COMMENT '重量';


ALTER TABLE `{$prefix}lbfarm_claim_order` ADD COLUMN `init_price` decimal(10,2) DEFAULT '0.00';

ALTER TABLE `{$prefix}lbfarm_land_order` ADD COLUMN `init_price` decimal(10,2) DEFAULT '0.00';

ALTER TABLE `{$prefix}lbfarm_send_order` ADD COLUMN `goods_num` int(11) DEFAULT '0' COMMENT '配送件数';

ALTER TABLE `{$prefix}lbfarm_send_order` ADD COLUMN `weight` decimal(10,2) DEFAULT '0.00' COMMENT '重量';

ALTER TABLE `{$prefix}lbfarm_pay_config` ADD COLUMN `ali_appid` varchar(64) DEFAULT '' COMMENT '支付宝appid';

ALTER TABLE `{$prefix}lbfarm_pay_config` ADD COLUMN `ali_privatekey` text COMMENT '支付宝私钥';

ALTER TABLE `{$prefix}lbfarm_pay_config` ADD COLUMN `ali_publickey` text COMMENT '支付宝公钥';

ALTER TABLE `{$prefix}lbfarm_claim_order` ADD COLUMN `out_refund_no` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_claim_order` ADD COLUMN `is_collage` tinyint(3) DEFAULT '0' COMMENT '是否是拼团订单';

ALTER TABLE `{$prefix}lbfarm_claim_order` ADD COLUMN `have_notice` tinyint(3) DEFAULT '0' COMMENT '是否发送消息';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `push_key` varchar(255) DEFAULT '' COMMENT 'app推送key';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `push_secret` varchar(255) DEFAULT '' COMMENT 'app推送secret';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `short_id` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `short_secret` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `short_sign` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `short_code` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN `push_id` varchar(64) DEFAULT '';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN `sign_notice_time` bigint(11) DEFAULT '0' COMMENT '签到时间';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN `sign_time` bigint(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_massif_list` ADD COLUMN `top` int(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_shop_refund_order_goods` ADD COLUMN `kill_atv_id` int(11) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_config` ADD COLUMN `ios_login` tinyint(3) DEFAULT '0';

ALTER TABLE `{$prefix}lbfarm_user_list` ADD COLUMN `check` tinyint(3) DEFAULT '0';



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_admin_role` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `admin_id` int(11) DEFAULT '0',
  `role_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_node` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `role_id` int(11) DEFAULT '0' COMMENT '角色id',
  `node` varchar(625) DEFAULT '',
  `auth` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_role` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(64) DEFAULT '',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_claim_collage_join` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `atv_id` int(11) DEFAULT '0',
  `start_id` int(11) DEFAULT '0',
  `price` decimal(10,2) DEFAULT '0.00',
  `status` tinyint(3) DEFAULT '1',
  `num` int(11) DEFAULT '0',
  `is_start` tinyint(3) DEFAULT '0',
  `create_time` bigint(11) DEFAULT '0',
  `claim_id` int(11) DEFAULT '0',
  `order_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_claim_collage_list` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `claim_id` int(11) DEFAULT '0' COMMENT '认养id',
  `price` decimal(10,2) DEFAULT '0.00' COMMENT '价格',
  `success_num` int(11) DEFAULT '0' COMMENT '成团人数',
  `stock` int(11) DEFAULT '0' COMMENT '活动库存',
  `start_time` bigint(11) DEFAULT '0',
  `end_time` bigint(11) DEFAULT '0',
  `success_time` int(11) DEFAULT '0' COMMENT '成团时间 分钟',
  `start_times` int(11) DEFAULT NULL COMMENT '发起次数',
  `join_times` int(11) DEFAULT '0' COMMENT '参与次数',
  `top` int(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `title` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_claim_collage_start` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `atv_id` int(11) DEFAULT '0',
  `claim_id` int(11) DEFAULT '0',
  `end_time` bigint(11) DEFAULT '0',
  `price` decimal(10,2) DEFAULT '0.00',
  `create_time` bigint(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `success_num` int(11) DEFAULT '0',
  `order_id` int(11) DEFAULT '0',
  `join_times` int(11) DEFAULT '0',
  `success_times` bigint(11) DEFAULT '0',
  `have_num` int(11) DEFAULT '0' COMMENT '付款人数',
  `have_order_num` int(11) DEFAULT '0' COMMENT '下单人数',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_distribution_cash_list` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `source_id` int(11) DEFAULT '0',
  `cash` decimal(10,2) DEFAULT '0.00',
  `order_code` varchar(64) DEFAULT '',
  `transaction_id` varchar(64) DEFAULT NULL,
  `order_id` int(11) DEFAULT '0',
  `order_price` decimal(10,2) DEFAULT '0.00',
  `type` int(11) DEFAULT '1' COMMENT '1商城 2土地 3认养',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `fx_type` tinyint(3) DEFAULT '1' COMMENT '1一级分销 2二级分销',
  `reseller_id` int(11) DEFAULT '0' COMMENT '分销商id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_distribution_goods_list` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `cash_id` int(11) DEFAULT '0',
  `order_goods_id` int(11) DEFAULT '0',
  `balance` decimal(10,2) DEFAULT '0.00',
  `cash` decimal(10,2) DEFAULT NULL,
  `num` int(11) DEFAULT '0',
  `single_cash` decimal(10,2) DEFAULT '0.00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_distribution_list` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `user_name` varchar(32) DEFAULT '',
  `mobile` varchar(32) DEFAULT '',
  `fx_code` varchar(32) DEFAULT '' COMMENT '邀请码',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `sh_text` varchar(625) DEFAULT '',
  `pid` int(11) DEFAULT '0',
  `sh_time` bigint(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_freight_template` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT '',
  `type` tinyint(3) DEFAULT '1' COMMENT '1 按件数 2按重量',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_freight_template_config` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `template_id` int(11) DEFAULT '0',
  `start_num` double(10,2) DEFAULT '0.00' COMMENT '首重|首件',
  `start_price` decimal(10,2) DEFAULT '0.00',
  `add_num` double(10,2) DEFAULT NULL COMMENT '续重|续件',
  `add_price` decimal(10,2) DEFAULT '0.00',
  `type` tinyint(3) DEFAULT '1' COMMENT '1按件2按重',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_freight_template_province` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `config_id` int(11) DEFAULT '0',
  `province` varchar(128) DEFAULT '',
  `template_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_goods_cate` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `cate_id` int(11) DEFAULT '0',
  `goods_id` int(11) DEFAULT '0',
  `type` int(11) DEFAULT '1' COMMENT '1商城 2土地 3认养',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_goods_store` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `store_id` int(11) DEFAULT '0',
  `goods_id` int(11) DEFAULT '0',
  `type` tinyint(3) DEFAULT '1' COMMENT '1商品 2商品分类 3土地分类 4 认养分类',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_info_record` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `info_id` int(11) DEFAULT NULL,
  `create_time` bigint(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_integral_log` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0' COMMENT '用户id',
  `controller` int(11) DEFAULT '0' COMMENT '操作者',
  `integral_add` decimal(10,2) DEFAULT '0.00' COMMENT '增减积分',
  `integral_before` decimal(10,2) DEFAULT '0.00' COMMENT '当前积分',
  `integral_after` decimal(10,2) DEFAULT '0.00',
  `create_time` int(11) DEFAULT '0',
  `status` int(11) DEFAULT '0',
  `order_id` int(11) DEFAULT '0' COMMENT '订单id',
  `type` int(11) DEFAULT '0',
  `controller_type` int(11) DEFAULT '0',
  `update_time` int(11) NOT NULL DEFAULT '0',
  `refund` int(11) DEFAULT '0',
  `scene` int(11) DEFAULT '1',
  `double` int(11) DEFAULT '1' COMMENT '倍数',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_integral_shop` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `start_time` bigint(11) DEFAULT '0',
  `end_time` bigint(11) DEFAULT '0',
  `buy_limit` tinyint(3) DEFAULT '1' COMMENT '原价购买 1允许',
  `discount_add` tinyint(3) DEFAULT '1' COMMENT '优惠叠加 1允许',
  `user_limit` int(11) DEFAULT '1' COMMENT '兑换限制人数',
  `type` tinyint(3) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `atv_status` tinyint(3) DEFAULT '1',
  `goods_id` int(11) DEFAULT '0',
  `create_time` bigint(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_integral_shop_goods` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `atv_id` int(11) DEFAULT NULL,
  `goods_id` int(11) DEFAULT '0' COMMENT '商品id',
  `spe_id` int(11) DEFAULT '0' COMMENT '规格id',
  `stock` int(11) DEFAULT '0' COMMENT '库存',
  `price` decimal(10,2) DEFAULT '0.00' COMMENT '价格',
  `integral` decimal(10,2) DEFAULT '0.00',
  `have_stock` int(11) DEFAULT '0',
  `status` tinyint(11) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_integral_store` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `integral_id` int(11) DEFAULT '0',
  `store_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_luck_config` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(32) DEFAULT '',
  `icon` varchar(255) DEFAULT '',
  `type` tinyint(3) DEFAULT '1',
  `coupon_id` int(11) DEFAULT '0',
  `integral` decimal(10,2) DEFAULT '0.00',
  `num` int(11) DEFAULT '0',
  `balance` int(11) DEFAULT '0',
  `luck_id` int(11) DEFAULT '0',
  `top` int(11) DEFAULT '0',
  `status` int(11) DEFAULT '1' COMMENT '1未中奖 2中奖',
  `is_luck` int(11) DEFAULT '1' COMMENT '1是奖品 0谢谢惠顾',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;




CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_luck_draw` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT '' COMMENT '名称',
  `start_time` bigint(11) DEFAULT '0',
  `end_time` bigint(11) DEFAULT NULL,
  `day_times` int(11) DEFAULT '0' COMMENT '每天可抽奖次数',
  `integral` decimal(10,2) DEFAULT '0.00' COMMENT '每次消耗积分',
  `create_time` bigint(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `top` int(11) DEFAULT '0',
  `cover` varchar(255) DEFAULT '',
  `atv_status` tinyint(3) DEFAULT '1',
  `text` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_luck_record` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `atv_id` int(11) DEFAULT '0',
  `type` int(11) DEFAULT '1',
  `title` varchar(255) DEFAULT '',
  `coupon_id` int(11) DEFAULT '0',
  `integral` decimal(10,2) DEFAULT NULL,
  `use_integral` decimal(10,2) DEFAULT '0.00',
  `create_time` bigint(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `is_luck` tinyint(3) DEFAULT '1',
  `icon` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_member` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT '',
  `status` tinyint(3) DEFAULT '1',
  `top` int(11) DEFAULT '0',
  `create_time` bigint(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_seckill_config` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `atv_id` int(11) DEFAULT '0',
  `spe_id` int(11) DEFAULT '0',
  `price` decimal(10,2) DEFAULT '0.00',
  `stock` int(11) DEFAULT '0',
  `goods_id` int(11) DEFAULT '0',
  `have_stock` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_seckill_goods` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `atv_id` int(11) DEFAULT '0',
  `goods_id` int(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_seckill_list` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `goods_id` int(11) DEFAULT '0',
  `title` varchar(255) DEFAULT '',
  `start_time` bigint(11) DEFAULT '0',
  `end_time` bigint(11) DEFAULT '0',
  `is_limit` tinyint(3) DEFAULT '0' COMMENT '是否限购',
  `limit_num` int(11) DEFAULT '0' COMMENT '限购件数',
  `over_time` int(11) DEFAULT '0',
  `top` int(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `atv_status` tinyint(3) DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;



CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_shop_spe` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `goods_id` int(10) NOT NULL,
  `title` varchar(101) NOT NULL COMMENT '规格名',
  `pid` int(10) NOT NULL DEFAULT '0' COMMENT '0=>顶级规格 其他=>上级规格id',
  `uniacid` int(10) NOT NULL,
  `status` int(3) NOT NULL DEFAULT '1',
  `create_time` int(11) NOT NULL DEFAULT '0',
  `update_time` int(11) NOT NULL DEFAULT '0',
  `image` varchar(2000) DEFAULT NULL COMMENT '子规格图片地址',
  `is_img` tinyint(1) unsigned DEFAULT '0' COMMENT '0.子规格无图  1.子规格有图',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_shop_spe_price` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `goods_id` int(10) NOT NULL,
  `spe_id_1` varchar(100) NOT NULL DEFAULT '',
  `spe_id_2` varchar(100) NOT NULL DEFAULT '',
  `price` decimal(10,2) NOT NULL DEFAULT '0.00',
  `stock` int(10) NOT NULL DEFAULT '0',
  `uniacid` int(10) NOT NULL,
  `status` int(3) NOT NULL DEFAULT '1',
  `create_time` int(11) NOT NULL DEFAULT '0',
  `update_time` int(11) NOT NULL DEFAULT '0',
  `original_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '原价',
  `cost_price` double(10,2) DEFAULT '0.00' COMMENT '成本价',
  `lock` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_signin` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `cover` varchar(255) DEFAULT '' COMMENT '背景图',
  `integral` decimal(10,2) DEFAULT '0.00',
  `text` varchar(625) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_signin_record` (
   `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT NULL,
  `integral` decimal(10,2) DEFAULT '0.00',
  `create_time` bigint(11) DEFAULT '0',
  `create_date` varchar(32) DEFAULT '',
  `status` tinyint(3) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_system_info` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `user_id` int(11) DEFAULT '0',
  `type` tinyint(3) DEFAULT '1',
  `obj_id` int(11) DEFAULT '0',
  `msg` varchar(625) DEFAULT '',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `title` varchar(255) DEFAULT '',
  `order_code` varchar(64) DEFAULT '',
  `goods_cover` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_welfare_column` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT NULL,
  `title` varchar(64) DEFAULT '',
  `cover` varchar(255) DEFAULT '',
  `top` int(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `create_time` bigint(11) DEFAULT '0',
  `content` text,
  `type` tinyint(3) DEFAULT '1' COMMENT '1公益栏目 2系统公告 3运营公告',
  `sub_title` varchar(625) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


CREATE TABLE IF NOT EXISTS `{$prefix}lbfarm_v2_seckill_info` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `uniacid` int(11) DEFAULT '0',
  `user_id` int(11) DEFAULT '0',
  `kill_id` int(11) DEFAULT '0',
  `status` tinyint(3) DEFAULT '1',
  `goods_id` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

updateSql;




return $sql;